<?php
namespace app\index\model;

use think\Model;

class User extends Model
{
    protected $auto     = [];
    protected $insert   = ['status' => 1, 'create_ip', 'create_time'];
    protected $update   = ['update_time'];

    protected function setCreateIpAttr()
    {
        return request()->ip();
    }

    protected function setCreateTimeAttr()
    {
        return time();
    }

    protected function setUpdateTimeAttr()
    {
        return time();
    }

}
